package com.thinkgem.jeesite.modules.sys.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.thinkgem.jeesite.modules.sys.exception.BusinessException;
import com.thinkgem.jeesite.modules.sys.utils.UserUtils;

/**
 * 文件管理Controller
 * @author Dean
 * @version 2017-02-28
 */
@Controller
@RequestMapping(value = "${adminPath}/sys/fileManage")
public class FileManageController extends BaseController {

	@RequestMapping(value = "index")
	public String index(Model model) {
		User user = UserUtils.getUser();
		if(user == null || user.getId() == null){
			throw new BusinessException("请登陆后再进行操作");
		}
		model.addAttribute("userId", user.getId());
		return "modules/sys/elfinder";
	}
	
}
